using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace JT808Protocol.Models.BodyParserStrategy
{
    /// <summary>
    /// 行驶记录数据
    /// </summary>
    public class DpTravelRecordReport_0x0700 : IJT808Body
    {
        /// <summary>
        /// 应答流水号
        /// </summary>
        [JsonPropertyName("应答流水号")] public ushort ReqID { get; set; }

        /// <summary>
        /// 命令字
        /// </summary>
        [JsonPropertyName("命令字")] public byte CmdID;

        /// <summary>
        /// 行驶记录数据块，参照 GB/T 19055 附录A RS232 串行数据通信协议
        /// </summary>
        [JsonPropertyName("行驶记录数据块")] public byte[] TravelData;

        public override IJT808Body ReadBody(ReadOnlySpan<byte> data, ref int index)
        {
            //    //var index = startIndex;
            //    //RspSerialID = ParseHelper.Uint16(ref source, index);

            //    //index += 2;
            //    //CmdID = source[index];

            //    //index++;
            //    //TravelData = new byte[DataBuffer.Length - 3];
            //    //Array.Copy(DataBuffer, 3, TravelData, 0, TravelData.Length);

            //    return true;

            throw new NotImplementedException();
        }

        public override List<byte> WriteToBytes()
        {
            throw new NotImplementedException();
        }
    }
}